package mornd.test1;

import mornd.test1.service.UserService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author: mornd
 * @dateTime: 2023/5/5 - 17:28
 * aop 三种方式：
 *          aspectj-maven-compile-plugin 编译阶段
 *          agent 类加载阶段
 *          代理实现
 */

@SpringBootApplication
public class App {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(App.class, args);
        UserService bean = context.getBean(UserService.class);
        System.out.println(bean.getClass());
        bean.add();
        //context.close();

        //new UserService().add();
    }
}
